<template>
	<view>
		<u-popup :show="show" mode="bottom"  @close="close" @open="open" closeable>
		        <view style="height: 400rpx;">
		           <view class="" style="font-weight: 800;margin-top: 10px;margin-left: 10px;">
						发表评论
		           </view>
				   <u-textarea v-model="content" placeholder="请输入内容" border="bottom" count></u-textarea>
				   <view class="" style="position: absolute;bottom: 7px;right: 11px;">
				   	<u-button type="primary" size="small" text="发表" @click="sedComment()"></u-button>
				   </view>
		        </view>
			</u-popup>
	</view>
</template>

<script>
	
	export default {
		name:"comment-input",
		props:{
			show:{
				type:Boolean,
				default:false
			}
		},
		data() {
			return {
					content:'',	
					
			};
		},
		methods:{
			open() {
			  // console.log('open');
			},
			close() {
				console.log("关闭")
			  this.$emit('showCommentInput',false,null)
			  this.content=''
			  // console.log('close');
			},
			sedComment(){
				
				this.$emit('sedComment',this.content)
				this.content=''
			}
		}
	
	}
</script>

<style lang="scss">

</style>
